package com.llmcu.efficient.validation.se.pojo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * xxxx
 *
 * @author liuling
 * @date 2025/3/23 20:07
 */
@Data
public class People {
    public interface AddGroup {}
    public interface MinusGroup {}
    public interface MsgGroup {}

    @NotBlank(message = "name不能为空")
    private String name;
    @NotBlank(message = "减人原因不能为空", groups = People.MinusGroup.class)
    private String minusReason;
    @NotBlank(message = "加人原因不能为空", groups = People.AddGroup.class)
    private String addReason;
    @Length(max = 20,message = "信息变更原因最大长度20")
    @NotBlank(message = "信息变更原因不能为空")
    private String msgReason;
}
